package com.xjscrm.console.web.group;

import com.xjscrm.console.param.BaseDto;
import com.xjscrm.console.param.group.WwGroupTaskQuery;
import com.xjscrm.console.service.customer.wwCustomer.WwGroupTaskService;
import com.xjscrm.console.vo.WwGroupTaskVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@Api(value = "客户群批量任务管理", tags = "客户群批量任务管理")
@RestController
@RequestMapping(value = "/wwGroup/task")
public class WwGroupTaskController {


    @Autowired
    private WwGroupTaskService wwGroupTaskService;

    @ApiOperation(value = "获取客户群批量任务类型下拉", notes = "获取客户群批量任务类型下拉",response = Map.class)
    @PostMapping(value ="/getTaskTypeDropdown" )
    public Object getTaskTypeDropdown(@RequestBody BaseDto baseDto)throws Exception{
        return wwGroupTaskService.getTaskTypeDropdown(baseDto);
    }

    @ApiOperation(value = "获取客户群批量任务列表", notes = "获取客户群批量任务列表",response = WwGroupTaskVo.class)
    @PostMapping(value ="/getTask" )
    public Object getTask(@RequestBody WwGroupTaskQuery wwGroupTaskQuery)throws Exception{
        return wwGroupTaskService.getTask(wwGroupTaskQuery);
    }


}
